package HashMapExample;

import java.util.Collections;
import java.util.HashMap;

public class HashMapExample {

    public static void main(String[] args) {
        //将HashMap包装成同步集合。
        //HashMap<Object,Object> hashMap= (HashMap<Object, Object>) Collections.synchronizedMap(new HashMap<>());
        HashMap<String,String> hashMap=new HashMap<>();

        hashMap.put("A","a");
        hashMap.put("B","b");
        hashMap.put("C","c");
        hashMap.put("D","d");


        System.out.println(hashMap);

        System.out.println(1 & 15);
        System.out.println(2 & 15);
        System.out.println(3 & 15);
        System.out.println(4 & 15);
        System.out.println(5 & 15);
        System.out.println(6 & 15);
        System.out.println(7 & 15);
        System.out.println(8 & 15);
        System.out.println(9 & 15);
        System.out.println(10 & 15);
        System.out.println(11 & 15);
        System.out.println(12 & 15);
        System.out.println(13 & 15);
        System.out.println(14 & 15);
        System.out.println(15 & 15);

    }
}

